import Root from "./root.tsx";
import {
  createBrowserRouter,
} from "react-router-dom";
import ErrorPage from './error-page.tsx'
import Hooks from '@/pages/hooks.tsx'
import Closure from '@/pages/closure.tsx'
import Home from "@/App.tsx";

export const routeList = [
  {
    path: "/",
    element: <Root />,
    errorElement: <ErrorPage />,
    children: [
      {
        path: "",
        element: <Home />,
      },
      {
        path: "hooks",
        element: <Hooks />,
      },
      {
        path: "closure",
        element: <Closure />,
      },
    ],
  },
]

export const router = createBrowserRouter(routeList);